home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / WCE30A.ARJ / DSIINIT.C < prev    next >
C/C++ Source or Header  |  1992-05-07  |  2KB  |  68 lines

  1. /*
  2. *
  3. * MODULE: DSIINIT.C
  4. *
  5. */
  6.  
  7. #include "dsimport.h"
  8.  
  9. HWND hwndImportWnd;
  10.  
  11. /*
  12. *
  13. * FUNCTION: InitializeApplication(HANDLE)
  14. *
  15. */
  16. BOOL FAR PASCAL InitializeApplication(hInst)
  17. HANDLE hInst;
  18. {
  19.       WNDCLASS wc;
  20.  
  21.       wc.style = NULL;
  22.       wc.lpfnWndProc = ImportWndProc;
  23.       wc.cbClsExtra = NULL;
  24.       wc.cbWndExtra = NULL;
  25.       wc.hInstance = hInst;
  26.       wc.hIcon = LoadIcon(hInst, DSIMPORT);
  27.       wc.hCursor = LoadCursor(NULL, IDC_ARROW);
  28.       wc.hbrBackground = GetStockObject(LTGRAY_BRUSH);
  29.       wc.lpszMenuName = DSIMENU;
  30.       wc.lpszClassName = "DSIWnd";
  31.       
  32.       return(RegisterClass(&wc));
  33. }
  34. /*
  35. *
  36. * FUNCTION: InitializeInstance(LPSTR, int)
  37. *
  38. */
  39. BOOL FAR PASCAL InitializeInstance(lpCmdLine, nCmdShow)
  40. LPSTR lpCmdLine;
  41. int nCmdShow;
  42. {
  43.       char sz[80];
  44.       
  45.       LoadString(hInst, IDS_APPNAME, sz, sizeof(sz));
  46.  
  47.       hwndImportWnd = CreateWindow("DSIWnd",
  48.                                      sz,
  49.                                      WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
  50.                                      CW_USEDEFAULT,
  51.                                      CW_USEDEFAULT,
  52.                                      CW_USEDEFAULT,
  53.                                      CW_USEDEFAULT,
  54.                                      NULL,
  55.                                      NULL,
  56.                                      hInst,
  57.                                      NULL);
  58.  
  59.       
  60.       if (!hwndImportWnd)
  61.                return(FALSE);
  62.  
  63.       ShowWindow(hwndImportWnd, SW_SHOWMAXIMIZED);
  64.  
  65.       return(TRUE);
  66. }
  67.  
  68.